package com.util;


import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ProxyTest {

    @Test
    public void t1(){
        ClassPathXmlApplicationContext applicationContext=new ClassPathXmlApplicationContext("spring.xml");
        //aop会自动使用代理对象替换原本交由spring容器管理的对象
        TargetInterFace target = (TargetInterFace) applicationContext.getBean("target");
        int method = target.method(123, 321);


    }
}
